package com.wms.shop.enums;

import com.baomidou.mybatisplus.annotation.IEnum;

public enum DeliveryStatus implements IEnum<String> {
    /**
     * 待发货
     */
    NO("待发货", "0"),

    /**
     * 已发货
     */
    YES("已发货", "1"),


    /**
     * 已签收
     */
    SIGN("已签收", "2");


    private String name;
    private String value;

    DeliveryStatus(String name, String value) {
        this.name  = name;
        this.value = value;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    public String getName() {
        return this.name;
    }

    public static DeliveryStatus parse(String value) {
        for (DeliveryStatus inventoryStatus : values()) {
            if (inventoryStatus.getValue().equals(value)) {
                return inventoryStatus;
            }
        }
        return null;
    }
}
